package org.xg.study.pd.test;

import com.alibaba.fastjson.JSONObject;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xg.study.pd.ActivityExecStatusController;
import org.xg.study.pd.ActivityService;
import org.xg.study.pd.Result;
import org.xg.study.pd.Status;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName ApiTest19_01
 * @date 2021/9/17 14:34
 **/
public class ApiTest19_01 {
    private Logger logger = LoggerFactory.getLogger(ApiTest19_01.class);

    @Test
    public void test(){
        //初始化数据
        String activityId = "1000001";
        ActivityService.init(activityId, Status.Editing);
        ActivityExecStatusController activityExecStatusController = new ActivityExecStatusController();
        Result result = activityExecStatusController.execStatus(activityId,Status.Editing, Status.Refuse);
        logger.info("测试结果（编辑中To审核拒绝）：{}", JSONObject.toJSONString(result));

        result = activityExecStatusController.execStatus(activityId,Status.Editing,Status.Check);
        logger.info("测试结果（编辑中To提交审核）：{}", JSONObject.toJSONString(result));
    }
}
